package com.ansion.user.listener;

import androidx.annotation.NonNull;

import com.ansion.basetool.preconditions.Preconditions;
import com.ansion.user.beanforui.ContactActiveInfo;


/**
 * created by zhaoyuntao
 * on 04/07/2022
 * description:
 */
public abstract class ContactActiveListener {
    private String uid;

    public ContactActiveListener(@NonNull String uid) {
        Preconditions.checkNotEmpty(uid);
        this.uid = uid;
    }

    public boolean match(@NonNull String uid) {
        return this.uid.equals(uid);
    }

    final public void init(String userUid) {
        Preconditions.checkNotEmpty(userUid);
        this.uid = userUid;
    }

    public String getUid() {
        return uid;
    }

    public abstract void onContactActiveChange(@NonNull ContactActiveInfo contactActiveInfo);
}
